/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package justdoit.view.model;

import javax.swing.Icon;
import justdoit.model.Priority;

/**
 * The model for Table, display the icon
 * @author Can
 */
public class PriorityWithIcon {

    private Priority priority;
    private Icon icon;

    public PriorityWithIcon(String priority, Icon icon) {
        this.priority = new Priority(priority);
        this.icon = icon;
    }

    public Icon getIcon() {
        return icon;
    }

    public String getDisplayPriority() {
        return priority.getDisplayPriority();
    }

    public Priority getPriority() {
        return priority;
    }

    public int compareTo(PriorityWithIcon p2) {
        return this.priority.compareTo(p2.getPriority());
    }
}
